Embedded Dialog S Directive

Syntax

%S%

Description

The S directive makes an embedded dialog scrollable.

Example

ui_modeless_dlg_box("ParentDialog",<<%dlg%
{startup=init}
{frame=1,1}
{embedded=%s%40,20:ChildDialog};
{lf};
{sp};
%dlg%,<<%code%
IF a_dlg_button = "Hello" THEN
    ui_dlg_event("ChildDialog","Hello",.t.)
    ui_msg_box("","Another message from the parent dialog")
END IF
IF a_dlg_button = "init" THEN
    a_dlg_button = ""
    show_embedded(local_variables())
END IF
IF a_dlg_button = "close" THEN
    ui_modeless_dlg_close("ParentDialog")
END IF
%code%)
FUNCTION show_embedded as V (vars as P)
with vars
ui_modeless_dlg_box("ChildDialog",<<%dlg%
{wrap=40}
This is an embedded dialog box that responds to the Hello event sent to it from its
parent.;
{lf};
Name: [.20name];
{lf};
Enter a name into the Name field and click this button. After 2 seconds, the "Hello"
dialog box will appear.;
{lf};
;
%dlg%,<<%code%
IF a_dlg_button = "Hello" THEN
    sleep(2)
    ui_msg_box("","Hello: " + name)
END IF
%code%)
end with
END FUNCTION

See Also